home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / mac / hypercar / hamradio / adv23.sit / Advanced Ham Test / background_7720.txt < prev    next >
Encoding:
Text File  |  1991-04-09  |  8.7 KB  |  381 lines

  1. -- background: 7720 from stack: in
  2. -- bmap block id: 8153
  3. -- flags: 0000
  4. -- background id: 0
  5. -- name: Test
  6. ----- HyperTalk script -----
  7. On openCard
  8.   global questans, questkey, rightone, group
  9.   hide background button "Correct!"
  10.   set hilight of background button A to false
  11.   set hilight of background button B to false
  12.   set hilight of background button C to false
  13.   set hilight of background button D to false
  14.   get the number of card
  15.   -- ΓÇóΓÇóΓÇó choose question # or card # option
  16.   put "Question #" & group into field "Q#" -- question # option
  17.   -- put "Question #"&it-2 into field "Q#" -- card # option
  18.   put rightone into item group of questkey
  19.   put item group of questans into foo
  20.   if foo is not empty then set hilight of background button foo to true
  21. end openCard
  22.  
  23. on closeCard
  24.   set lockScreen to true
  25.   set hilight of background button A to false
  26.   set hilight of background button B to false
  27.   set hilight of background button C to false
  28.   set hilight of background button D to false
  29.   set lockScreen to false
  30.   hide background button "Correct!"
  31. end closeCard
  32.  
  33. on idle
  34.   global time1
  35.   -- comment out next line (exit idle) if you want a time limit on test.
  36.   -- don't forget to set time limit as described in Exam button of
  37.   -- first card.
  38.   exit idle
  39.   put the seconds into time2
  40.   if time2<time1 then exit idle
  41.   if time2ΓëÑtime1 then
  42.     answer "Too much Time. Try again?" with "OK" or "Quit"
  43.   end if
  44.   if it is "OK" then
  45.     visual effect dissolve to black
  46.     visual effect iris open
  47.     go first card
  48.     openStack
  49.   else
  50.     visual effect dissolve
  51.     go home
  52.   end if
  53. end idle
  54.  
  55. on randomNext
  56.   global group,questlist
  57.   add one to group
  58.   if group > 50 then go card report
  59.   get item group of questlist
  60.   go card it
  61. end randomNext
  62.  
  63. on randomPrev
  64.   global group,questlist
  65.   subtract one from group
  66.   if group < 1 then go first card
  67.   get item group of questlist
  68.   go card it
  69. end randomPrev
  70.  
  71. on reView
  72.   global rightone, immediate
  73.   if not immediate then
  74.     wait 3 seconds
  75.     put "Correct answer is " & rightone into foo
  76.     answer foo with "Oh!"
  77.   else
  78.     if hilite of background button rightone is false then
  79.       put "Correct answer is " & rightone into foo
  80.       answer foo with "Oh!"
  81.     else
  82.       -- show background button "Correct!"
  83.     end if
  84.   end if
  85. end reView
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108. -- part 1 (field)
  109. -- low flags: 00
  110. -- high flags: 0000
  111. -- rect: left=16 top=68 right=136 bottom=500
  112. -- title width / last selected line: 0
  113. -- icon id / first selected line: 0 / 0
  114. -- text alignment: 0
  115. -- font id: 3
  116. -- text size: 10
  117. -- style flags: 0
  118. -- line height: 13
  119. -- part name: Q1
  120.  
  121.  
  122. -- part 11 (field)
  123. -- low flags: 00
  124. -- high flags: 0000
  125. -- rect: left=48 top=137 right=177 bottom=499
  126. -- title width / last selected line: 0
  127. -- icon id / first selected line: 0 / 0
  128. -- text alignment: 0
  129. -- font id: 3
  130. -- text size: 10
  131. -- style flags: 0
  132. -- line height: 13
  133. -- part name: D
  134.  
  135.  
  136. -- part 25 (button)
  137. -- low flags: 00
  138. -- high flags: 0000
  139. -- rect: left=204 top=313 right=342 bottom=241
  140. -- title width / last selected line: 0
  141. -- icon id / first selected line: 902 / 902
  142. -- text alignment: 1
  143. -- font id: 0
  144. -- text size: 12
  145. -- style flags: 0
  146. -- line height: 16
  147. -- part name: Prev
  148. ----- HyperTalk script -----
  149. on mouseUp
  150.   -- ΓÇóΓÇóΓÇóComment out last command & uncomment next to last for sequential
  151.   -- cards.  Comment out next to last and uncomment last command for
  152.   -- random cards from buildList (in background of first card of stack).
  153.   global immediate, group, questans
  154.   if item group of questans is not empty then
  155.     if immediate then reView
  156.   end if
  157.   visual effect wipe right fast to black
  158.   visual effect wipe left
  159.   -- go to previous card  -- ΓÇóΓÇóΓÇó for sequential cards
  160.   randomPrev -- ΓÇóΓÇóΓÇó for randomly-generated cards from buildList
  161. end mouseUp
  162.  
  163.  
  164. -- part 26 (button)
  165. -- low flags: 00
  166. -- high flags: 0000
  167. -- rect: left=297 top=313 right=342 bottom=333
  168. -- title width / last selected line: 0
  169. -- icon id / first selected line: 26425 / 26425
  170. -- text alignment: 1
  171. -- font id: 0
  172. -- text size: 12
  173. -- style flags: 0
  174. -- line height: 16
  175. -- part name: Next
  176. ----- HyperTalk script -----
  177. on mouseUp
  178.   -- ΓÇóΓÇóΓÇóComment out last command & uncomment next to last for sequential
  179.   -- cards.  Comment out next to last and uncomment last command for
  180.   -- random cards from buildList (in background of first card of stack).
  181.   global immediate, group, questans
  182.   if item group of questans is not empty then
  183.     if immediate then reView
  184.   end if
  185.   visual effect wipe left fast to black
  186.   visual effect wipe right fast
  187.   -- go to next card -- ΓÇóΓÇóΓÇó for sequential cards
  188.   randomNext -- ΓÇóΓÇóΓÇó for randomly-generated cards from buildList
  189. end mouseUp
  190.  
  191.  
  192.  
  193. -- part 27 (field)
  194. -- low flags: 00
  195. -- high flags: 0000
  196. -- rect: left=48 top=178 right=219 bottom=508
  197. -- title width / last selected line: 0
  198. -- icon id / first selected line: 0 / 0
  199. -- text alignment: 0
  200. -- font id: 3
  201. -- text size: 10
  202. -- style flags: 0
  203. -- line height: 13
  204. -- part name: D
  205.  
  206.  
  207. -- part 28 (field)
  208. -- low flags: 00
  209. -- high flags: 0000
  210. -- rect: left=48 top=221 right=262 bottom=508
  211. -- title width / last selected line: 0
  212. -- icon id / first selected line: 0 / 0
  213. -- text alignment: 0
  214. -- font id: 3
  215. -- text size: 10
  216. -- style flags: 0
  217. -- line height: 13
  218. -- part name: D
  219.  
  220.  
  221. -- part 29 (field)
  222. -- low flags: 00
  223. -- high flags: 0000
  224. -- rect: left=47 top=264 right=306 bottom=502
  225. -- title width / last selected line: 0
  226. -- icon id / first selected line: 0 / 0
  227. -- text alignment: 0
  228. -- font id: 3
  229. -- text size: 10
  230. -- style flags: 0
  231. -- line height: 13
  232. -- part name: D
  233.  
  234.  
  235. -- part 20 (field)
  236. -- low flags: 00
  237. -- high flags: 0004
  238. -- rect: left=15 top=31 right=53 bottom=166
  239. -- title width / last selected line: 0
  240. -- icon id / first selected line: 0 / 0
  241. -- text alignment: 0
  242. -- font id: 0
  243. -- text size: 12
  244. -- style flags: 0
  245. -- line height: 16
  246. -- part name: Q#
  247. ----- HyperTalk script -----
  248.  
  249.  
  250.  
  251.  
  252. -- part 36 (button)
  253. -- low flags: 00
  254. -- high flags: 0000
  255. -- rect: left=368 top=305 right=342 bottom=406
  256. -- title width / last selected line: 0
  257. -- icon id / first selected line: 21700 / 21700
  258. -- text alignment: 1
  259. -- font id: 0
  260. -- text size: 12
  261. -- style flags: 0
  262. -- line height: 16
  263. -- part name: Home
  264. ----- HyperTalk script -----
  265. on mouseUp
  266.   visual effect iris close
  267.   go home
  268. end mouseUp
  269.  
  270.  
  271.  
  272.  
  273. -- part 38 (button)
  274. -- low flags: 80
  275. -- high flags: 8002
  276. -- rect: left=173 top=116 right=138 bottom=245
  277. -- title width / last selected line: 0
  278. -- icon id / first selected line: 0 / 0
  279. -- text alignment: 1
  280. -- font id: 0
  281. -- text size: 12
  282. -- style flags: 0
  283. -- line height: 16
  284. -- part name: Correct!
  285.  
  286.  
  287. -- part 39 (button)
  288. -- low flags: 00
  289. -- high flags: 8005
  290. -- rect: left=14 top=138 right=174 bottom=44
  291. -- title width / last selected line: 0
  292. -- icon id / first selected line: 0 / 0
  293. -- text alignment: 1
  294. -- font id: 0
  295. -- text size: 12
  296. -- style flags: 0
  297. -- line height: 16
  298. -- part name: A
  299. ----- HyperTalk script -----
  300. on mouseUp
  301.   global questans, group
  302.   set hilight of background button A to true
  303.   set hilight of background button B to false
  304.   set hilight of background button C to false
  305.   set hilight of background button D to false
  306.   put "A" into item group of questans
  307. end mouseUp
  308.  
  309.  
  310.  
  311. -- part 40 (button)
  312. -- low flags: 00
  313. -- high flags: 8005
  314. -- rect: left=14 top=178 right=214 bottom=44
  315. -- title width / last selected line: 0
  316. -- icon id / first selected line: 0 / 0
  317. -- text alignment: 1
  318. -- font id: 0
  319. -- text size: 12
  320. -- style flags: 0
  321. -- line height: 16
  322. -- part name: B
  323. ----- HyperTalk script -----
  324. on mouseUp
  325.   global questans, group
  326.   set hilight of background button A to false
  327.   set hilight of background button B to true
  328.   set hilight of background button C to false
  329.   set hilight of background button D to false
  330.   put "B" into item group of questans
  331. end mouseUp
  332.  
  333.  
  334.  
  335. -- part 41 (button)
  336. -- low flags: 00
  337. -- high flags: 8005
  338. -- rect: left=14 top=219 right=255 bottom=44
  339. -- title width / last selected line: 0
  340. -- icon id / first selected line: 0 / 0
  341. -- text alignment: 1
  342. -- font id: 0
  343. -- text size: 12
  344. -- style flags: 0
  345. -- line height: 16
  346. -- part name: C
  347. ----- HyperTalk script -----
  348. on mouseUp
  349.   global questans, group
  350.   set hilight of background button A to false
  351.   set hilight of background button B to false
  352.   set hilight of background button C to true
  353.   set hilight of background button D to false
  354.   put "C" into item group of questans
  355. end mouseUp
  356.  
  357.  
  358.  
  359. -- part 42 (button)
  360. -- low flags: 00
  361. -- high flags: 8005
  362. -- rect: left=14 top=264 right=300 bottom=44
  363. -- title width / last selected line: 0
  364. -- icon id / first selected line: 0 / 0
  365. -- text alignment: 1
  366. -- font id: 0
  367. -- text size: 12
  368. -- style flags: 0
  369. -- line height: 16
  370. -- part name: D
  371. ----- HyperTalk script -----
  372. on mouseUp
  373.   global questans, group
  374.   set hilight of background button A to false
  375.   set hilight of background button B to false
  376.   set hilight of background button C to false
  377.   set hilight of background button D to true
  378.   put "D" into item group of questans
  379. end mouseUp
  380.  
  381.